/**
 **************************************
 **   @author: 野狼上校               **
 **   @since: 2024-07-17 10:42       **
 **   @version: 1.0                  **
 **************************************
 * <P>
 * 设备相关的Api
 */

import instance, {RespResult} from "@/api/index.ts"

/*分页查询设备数据*/
export const getDevicesByPage = (data: any): Promise<RespResult> => {
    return instance({
        url: `/blade/device/getDevicesByPage`,
        method: "GET",
        params: data
    })
}

/*新增设备*/
export const addDevice = (data: any): Promise<RespResult> => {
    return instance({
        url: `/blade/device/insert`,
        method: "POST",
        data: data
    })
}

/*修改设备基本参数*/
export const editDevice = (data: any): Promise<RespResult> => {
    return instance({
        url: `/blade/device/update`,
        method: "PUT",
        data: data
    })
}

/*设备暂停*/
export const pauseDeviceQuartz = (data: any): Promise<RespResult> => {
    return instance({
        url: `/blade/quartz/pauseJob`,
        method: "GET",
        params: data
    })
}

/*设备运行*/
export const createDeviceQuartz = (data: any): Promise<RespResult> => {
    return instance({
        url: `/blade/quartz/createJob`,
        method: "GET",
        params: data
    })
}


/* 设备详情 */
export const getDeviceDesc = (data: any): Promise<RespResult> => {
    return instance({
        url: `/blade/device/getDeviceDescByDeviceGuid`,
        method: "GET",
        params: data
    })
}



